<%@ page language="java"
	import="java.util.*,edu.cnu.tpts.bean.*,edu.cnu.tpts.dao.*,edu.cnu.tpts.dao.impl.*"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/authorize.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<html>
<head>
	<base href="<%=basePath%>">
    <title>admin</title>
    <link rel="stylesheet" type="text/css" href="/css/main.css">
</head>
<body>
<div id="header">

</div>

<div id="menu">
    <ul>
      
        <li><a hidefocus="hidefocus" href="student/showMessage.jsp">查询个人信息</a></li>         
         <li><a hidefocus="hidefocus" href="student/updateMessage.jsp">更新个人信息</a></li>
        <li><a hidefocus="hidefocus" href="student/showScore.jsp">查询个人成绩</a></li>
        <li><a hidefocus="hidefocus" href="student/showTeacher.jsp">查询教师信息</a></li>
     <li><a hidefocus="hidefocus" href="student/predict.jsp">成绩和能力预测</a></li>
        <li><a hidefocus="hidefocus" href="student/alarm.jsp">查看预警信息</a></li>
         <li><a hidefocus="hidefocus" href="quit.jsp">退出</a></li>
         	 <%@include file="/WEB-INF/date.jsp"%>
     </ul>
 
</div>

<div class="table">

  <%
    
    StudentDao stuDao =new StudentDaoImpl();
    Student sstu=(Student)session.getAttribute("user");
    Student stu=stuDao.findById(sstu.getId());
    
     %>
      
     <table>
     	<tr>
     		<td>学号</td>
     		<td><%=stu.getId() %></td>
     	</tr>
     	<tr>
     		<td>登录名</td>
     		<td><%=stu.getLoginName() %></td>
     	</tr>
     	<tr>
     		<td>学生姓名</td>
     		<td><%=stu.getRealName() %></td>
     	</tr>
     		<tr>
     		<td>学生性别</td>
     		<td><%=stu.getSex() %></td>
     	</tr>
     	<tr>
     		<td>所在院系</td>
     		<td><%=stu.getStuDepartment() %></td>
     	</tr>
     	<tr>
     		<td>所在班级</td>
     		<td><%=stu.getStuClass() %></td>
     	</tr>
     	<tr>
     		<td>所选课程</td>
     		<td>	<%List<Course> courseList=stuDao.getStudentCourse(stu.getId()); 
     		    		
     		if(courseList.size()!=0){
    			for(Course  course:courseList){
    			%>
    			<%=course.getName() %>
    			<%}
    			
    			} else{
    			out.print("该生还没有选择课程");
    			
    			}%></td>
     	</tr>
     
     
     </table>
    

</div>

<div id="copyright">
    <div align="center">
        <font face="Tahoma, Verdana" color="#ffffff">Copyright &copy; 首都师范大学版权所有<br>

            地址：北京市西三环北路105号 100048&nbsp;&nbsp;&nbsp;&nbsp; E-mail: </font><font face="Tahoma, Verdana">

    </font>
    </div>

</div>

</body>
</html>
